package com.mycompany.inventory.pojo;

public class SaleInfo {
	private String Id;
	private String productId;
	private String name;
	private int saleValue;
	private boolean	showed;

	public SaleInfo(String id, String productId, String name, int value) {
		this.setId(id);
		this.setProductId(productId);
		this.setName(name);
		this.setSaleValue(value);
	}
	
	public SaleInfo(String id, String productId, String name, int value, boolean showed) {
		this.setId(id);
		this.setProductId(productId);
		this.setName(name);
		this.setSaleValue(value);
		this.setShowed(showed);
	}
	
	public SaleInfo(String name, int value){
		this.setName(name);
		this.setSaleValue(value);
		this.setShowed(true);
	}
	
	public SaleInfo() {
		this.setId("");
		this.setProductId("");
		this.setName("");
		this.setSaleValue(saleValue);
		this.setShowed(false);
	}
	
	public void clear(){
		this.setId("");
		this.setProductId("");
		this.setName("");
		this.setSaleValue(0);
		this.setShowed(false);
	}
	
	public void copyValue(SaleInfo Obj){
		this.setId(Obj.getId());
		this.setProductId(Obj.getProductId());
		this.setName(Obj.getName());
		this.setSaleValue(Obj.getSaleValue());
		this.setShowed(Obj.isShowed());
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return Id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		Id = id;
	}

	/**
	 * @return the productId
	 */
	public String getProductId() {
		return productId;
	}

	/**
	 * @param productId the productId to set
	 */
	public void setProductId(String productId) {
		this.productId = productId;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the saleValue
	 */
	public int getSaleValue() {
		return saleValue;
	}

	/**
	 * @param saleValue the saleValue to set
	 */
	public void setSaleValue(int saleValue) {
		this.saleValue = saleValue;
	}

	public String toString(){
		return name;
	}
	
	public boolean isShowed() {
		return showed;
	}

	public void setShowed(boolean showed) {
		this.showed = showed;
	}
	
}
